package com.appsindy.reserv.service;

import java.util.Map;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionContext;

public class BaseServices {
		
	@SuppressWarnings("unchecked")
	public Map getSession(){
		return ActionContext.getContext().getSession();
	}
	
	public HttpSession getHttpSession(){
		HttpSession httpSession = ServletActionContext.getRequest().getSession(false);
		return httpSession;
	}
	
	public Object getSessionAttribute(String name){
		return getHttpSession().getAttribute(name);
	}
	
}
